package hihocoder;
import java.util.Scanner;

/**
 * 
 */

/**
 * @author zhongfang
 *
 */
public class 投掷硬币 {

	private static double getResult(double[] p,int M) {
		double[][] x=new double[p.length][M+1];//当前元素是i，需要向上的个数为j
		x[x.length-1][1]=p[x.length-1];
		x[x.length-1][0]=1-p[x.length-1];
		for (int i = x.length-2; i >=0 ; i--) {
			for (int j = 0; j <= M; j++) {
				double tmp=0;	
				if(j!=0)
					tmp+=(x[i+1][j-1]*p[i]);
				tmp+=(x[i+1][j]*(1-p[i]));
				x[i][j]=tmp;
			}
		}
		return x[0][M];
	}
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Scanner scanner=new Scanner(System.in);
		int N=scanner.nextInt();
		int M=scanner.nextInt();
		scanner.nextLine();
		double[] P=new double[N];
		for (int i = 0; i < P.length; i++) {
			P[i]=scanner.nextDouble();
		}
		System.out.println(getResult(P, M));
	}

}
